package com.cyw.baselibrary;

import android.content.Context;

/**
 * Created by ChenYuanWang on 2019-03-15.
 */
public class BaseLibrary {

    private static Context context;

    public static void init(Context c) {
        context = c.getApplicationContext();
    }

    public static Context getContext() {
        if (context == null) {
            throw new NullPointerException("请先在Application中调用BaseLibrary的init方法初始化基础库");
        }
        return context;
    }
}
